<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>

    <style>
        .style1 {
            background-color: red;
            font-size: 100px;
        }

        .style2 {
            width: 100px;
            height: 200px;
            border: 1px solid #000;
        }
    </style>
</head>

<body>
    <div id="app">
        <div v-bind:style="{color:active1,backgroundColor:active2}" @click='changeClass'> {{msg}} </div>

        <div v-bind:style="[style1,style2]" @click='changeClass'> {{msg}} </div>
    </div>
    <script src="./vue.js"></script>
    <script>
        var vm = new Vue({
            el: '#app',
            data: {
                msg: 'xxx',

                active1: 'red',
                active2: 'green',
                style1: {
                    backgroundColor: 'red',
                    fontSize: '100px'
                },
                style2: {
                    width: '300px',
                    height: '300px',
                    border: '10px solid #000'
                }


            },
            methods: {
                changeClass() {}
            }
        });
    </script>
</body>

</html>